<!--
// +----------------------------------------------------------------------
// | Copyright (c) 2017 https://gitee.com/honoryao All rights reserved.
// +----------------------------------------------------------------------
// | Author: honoryao <2463523099@qq.com>
// +----------------------------------------------------------------------
// | Time: 2018/6/8   
// +----------------------------------------------------------------------
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue.extend 扩展实例构造器</title>
</head>
<body>
<h1>Vue.extend 扩展实例构造器</h1>
<hr>
<author></author>
<div id="author"></div>

<script src="../assets/js/vue.js"></script>
<script>
    var authorExtend = Vue.extend({
        template:"<p> <a :href='authorUrl'>{{authorname}}</a></p>",
        data:function () {
            return {
                authorname:'honoryao',
                authorUrl:'//www.baidu.com'
            }
        }
    });

    new authorExtend().$mount('author');
    new authorExtend().$mount('#author');
</script>
</body>
</html>